export const loading = {
	chars:'|/-',
	timer:null,
	index:0,
	text:[ '加载中...' , 'loading...' , '努力中...' ],
	start() {
		this.timer = setInterval(() => {
			this.index = ++this.index % this.chars.length;
			process.stdout.write(`\n \r  ${this.chars[this.index]} ${this.text[this.index]}`);
		},600);
	},
	out(){
		clearInterval(this.timer);
	}
};